<!DOCTYPE html>
<html ng-app="myApp">

  <head lang="en">
    <meta charset="utf-8" />
    <title>Dashboard</title>
    <script data-require="jquery@*" data-semver="2.0.3" src="http://code.jquery.com/jquery-2.0.3.min.js"></script>
  <!--  <script data-require="bootstrap@*" data-semver="3.0.0-rc1" src="//netdna.bootstrapcdn.com/bootstrap/3.0.0-rc1/js/bootstrap.min.js"></script>
    <link data-require="bootstrap-css@*" data-semver="3.0.0-rc1" rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.0-rc1/css/bootstrap.min.css" /> -->
    <link data-require="font-awesome@*" data-semver="3.0.2" rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/3.0.2/css/font-awesome.min.css" />
    <link rel="stylesheet" type="text/css" href="http://angular-ui.github.com/ng-grid/css/ng-grid.css" />
    <link rel="stylesheet" type="text/css" href="viewgrid_style_ajs.css" />
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
    <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.2/angular.min.js"></script>
    <script type="text/javascript" src="http://angular-ui.github.com/ng-grid/lib/ng-grid.debug.js"></script>
    <script type="text/javascript" src="viewgrid_ajs.js"></script> 
  </head>
<div ng-controller="MyCtrl">
  <body>
   <h1>Transaction List</h1> 
   <h3>Filter:</h3><input type="text" ng-model="filterOptions.filterText" placeholder="filter..." />
    <table class="gridStyle" ng-grid="gridOptionsParent"></table>
   
    <!-- <h1>DETAIL</h1> -->
    <div>
     <h3> Detail of {{selections[0].Dist_Name}} having Ref# {{selections[0].Referenceno}} Dated {{selections[0].Date}} for Amount {{selections[0].Dr_Amount}} <h3>
       </div>
      <!--<ul>
        Tran Date: {{selections[0].Date}} </br>
        Debit Amt:{{selections[0].Dr_Amount}} </br>
        Credit Amt:{{selections[0].Cr_Amount}} </br>
     </ul> -->    
 
  <div ng-view></div> 
        
 <div ng-controller="gettranctrl">
        <script>
            function gettranctrl($scope, $http,$window,$filter) {
            $http.get('data_det_new.php').success(function(data) {
			$scope.gettrandtls = data;
        	 //  $window.alert('hello');
             });
            }
	   </script>
      <!--<table class="gridStyle" ng-grid="gridOptionsChild"></table>  -->
      
      
      <table class="table table-bordered table-condensed">
        <thead>
        <tr>
          <th>Ref #</th>
          <th>PNR</th>
          <th>Travel Date</th>
          <th>Pax Name</th>
          <th>Sector</th>
          <th>Basic</th>
          <th>Taxes</th>
          <th>Admin charges</th>
          <th>Net Total</th> 
           <tr>
        </thead>
        <tbody>
          <tr ng-repeat='tran in gettrandtls | filter:{Referenceno:selections[0].Referenceno}'> 
		  <td>{{tran.Referenceno}}</td>
          <td>{{tran.PNR}}</td>
          <td>{{tran.TravelDate}}</td>
          <td>{{tran.PaxName}}</td>
          <td>{{tran.Sector}}</td>
          <td>{{tran.Basic}}</td>
          <td>{{tran.Tax}}</td>
          <td>{{tran.Admincharges}}</td>
          <td>{{tran.Amount}}</td> 
        </tr>
        </tbody>
      </table>
    </div>
  </div>
</body>
</html>